<?xml version="1.0" encoding="UTF-8"?>

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:b="http://www.billib.com/jsf/customtags"
    xmlns:t="http://myfaces.apache.org/tomahawk">
    
    <ui:composition>
            <b:inputText id="firstname" value="#{user.firstName}" label="#{msg['user.firstname.label']}" required="true"/>
            <b:inputText id="lastname" value="#{user.lastName}" label="#{msg['user.lastname.label']}" required="true"/>
            <b:inputText id="email" value="#{user.email}" label="#{msg['user.email.label']}" required="false"/>
            <b:inputText id="phone" value="#{user.phone}" label="#{msg['user.phone.label']}" required="false"/>
            <b:inputText id="mobile" value="#{user.mobile}" label="#{msg['user.mobile.label']}" required="false"/>
                 
            <h:outputLabel for="gender">
                <h:outputText value="#{msg['user.gender.label']}"/>
            </h:outputLabel>
            <h:selectOneRadio id="gender" value="#{user.gender}" required="true">
                <f:selectItem itemLabel="Male" itemValue="M"/>
                <f:selectItem itemLabel="Female" itemValue="F"/>
            </h:selectOneRadio>
            
            <b:inputText id="age" value="#{user.age}" label="#{msg['user.age.label']}" required="false"/>
              
            <h:outputLabel for="expired">
                <h:outputText value="#{msg['user.expired.label']}"/>
            </h:outputLabel>
            <h:selectOneRadio id="expired" 
                    value="#{user.expired}" 
                    converter="BooleanToCharConverter"
                    required="true">
                <f:selectItem itemLabel="Yes" itemValue="Y"/>
                <f:selectItem itemLabel="No" itemValue="N"/>
            </h:selectOneRadio>
            
            <h:outputLabel for="locked">
                <h:outputText value="#{msg['user.locked.label']}"/>
            </h:outputLabel>
            <h:selectOneRadio id="locked" 
                    value="#{user.locked}"
                    converter="BooleanToCharConverter"
                    required="true">
                <f:selectItem itemLabel="Yes" itemValue="Y"/>
                <f:selectItem itemLabel="No" itemValue="N"/>
            </h:selectOneRadio>
            
            <h:outputLabel for="enabled">
                <h:outputText value="#{msg['user.enabled.label']}"/>
            </h:outputLabel>
            <h:selectOneRadio id="enabled" 
                    value="#{user.enabled}"
                    converter="BooleanToCharConverter"
                    required="true">
                <f:selectItem itemLabel="Yes" itemValue="Y"/>
                <f:selectItem itemLabel="No" itemValue="N"/>
            </h:selectOneRadio>
            
            <h:outputLabel for="birthdate">
                <h:outputText value="#{msg['user.birthdate.label']}"/>
            </h:outputLabel>
            <t:inputCalendar id="birthdate" renderAsPopup="true" value="#{user.birthdate}"/>
    </ui:composition>
    
</html>
